<?php
// mod文件只能被入口文件引用，不能直接访问
if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$articleId = intval(getgpc('articleId'));
if($articleId < 1) {
	$articleId = 1;
}
$sql = "select id,title,sub_title,author_name,summary from t_article where id = $articleId";
$article = DB::fetch_first($sql);
if(isset($article)) {
	$paragraph_sql = 'select * from t_paragraph where article_id ='. $articleId.' order by article_id asc ';
	//获取当前页的留言数据
	$paragraph_list = array();
	$query = DB::query($paragraph_sql);
	while($row = DB::fetch($query)) {
		$paragraph_list[] = $row;
	}
	DB::free_result($query);
}

include_once template("know/viewarticle");
?>